import { currentUserID } from "@/utils/common.js";
import { utils } from 'hi-ui';
export default {
    id: "SupplierEntity",
    returnTotal:true,
    modelFile: "database/supplier/dataset/SupplierEntity.xml",
    sortFields: [
        "FID",
        "FDESC",
        "FDESCID",
        "FPINYIN",
        "FJIANPIN",
        "FENTERPRISEPERSON",
        "FENTERPRISESUPERVISOR",
        "FQUALITYSUPERVISOR",
        "FCONTACTMAN",
        "FCONTACTTEL",
        "FFAX",
        "FADDRESS",
        "FZIPCODE",
        "FEMAIL",
        "FBUSINESSTYPE",
        "FCERTIFICATION",
        "FCUSTOMERCATEGORY",
        "FSALESMAN",
        "FSALESMANIDCARD",
        "FTAXID",
        "FAREA",
        "FBUSINESSSCOPE",
        "FBANK",
        "FBANKACCOUNT",
        "FBUSINESSLICENSEIMG",
        "FBUSINESSLICENSEID",
        "FBUSINESSLICENSEDATE",
        "FBUSINESSLICENSESCOPE",
        "FDRUGLICENSEIMG",
        "FDRUGLICENSEID",
        "FDRUGLICENSEDATE",
        "FDRUGLICENSESCOPE",
        "FGSPLICENSEIMG",
        "FGSPLICENSEID",
        "FGSPLICENSEDATE",
        "FGSPLICENSESCOPE",
        "FNOTE",
        "FMEDICALINSTRUMENTIMG",
        "FMEDICALINSTRUMENTID",
        "FMEDICALINSTRUMENTDATE",
        "FMEDICALINSTRUMENTSCOPE",
        "FHEALTHLICENSEIMG",
        "FHEALTHLICENSEID",
        "FHEALTHLICENSEDATE",
        "FHEALTHLICENSESCOPE",
        "FORGCODE",
        "FLEGALPERSONAUTHDATE",
        "FQUALITYASSURANCEDATE",
        "FPURCHASECONTRACTDATE",
        "FUSERID",
        "FCREATEDATE",
        "FCOMPANY",
        "FBUSINESSTYPEID",
        "FCERTIFICATIONID",
        "FCUSTOMERCATEGORYID",
        "FENTERPRISEDESC",
        "FENTERPRISEID",
        "FFOODBUSINESSLICENSEIMG",
        "FFOODBUSINESSLICENSEID",
        "FFOODBUSINESSLICENSEDATE",
        "FFOODBUSINESSLICENSESCOPE"
    ], fields: {
        FID: {
            name: "FID", //字段ID
            label: "编号", //字段描述
            dbtype: "dbString", //数据类型
            default: {
                //默认值
                //rule: 'first', //prior   填充规则
                exps: (data) => {
                    //填充表达式
                    return utils.string.guid();
                },
            },
        },
        FDESC: {
            name: "FDESC", //字段ID
            label: "供应商名称", //字段描述
            dbtype: "dbString", //数据类型
            required: true,
            fireTarget: ["FPINYIN", "FJIANPIN"],
            length: 25,
        },


        FPINYIN: {
            name: "FPINYIN", //字段ID
            label: "拼音", //字段描述
            dbtype: "dbString", //数据类型
            length: 25,
            default: {
                //默认值
                //rule: 'first', //prior   填充规则
                exps: (data) => {
                    //填充表达式
                    return utils.string.getPinyin(data.FDESC || "");
                },
            },

        },
        FJIANPIN: {
            name: "FJIANPIN", //字段ID
            label: "简拼", //字段描述
            dbtype: "dbString", //数据类型
            length: 25,
            default: {
                //默认值
                //rule: 'first', //prior   填充规则
                exps: (data) => {
                    //填充表达式
                    return utils.string.getFirstPY(data.FDESC || "");

                },
            },
        },
        FDESCID: {
            name: "FDESCID", //字段ID
            label: "供应商编号", //字段描述
            dbtype: "dbString", //数据类型
            length: 100,

        },

        FENTERPRISEPERSON: {
            name: "FENTERPRISEPERSON", //字段ID
            label: "企业法人", //字段描述
            dbtype: "dbString", //数据类型
            required: true,
            length: 25,
        },
        FENTERPRISESUPERVISOR: {
            name: "FENTERPRISESUPERVISOR", //字段ID
            label: "企业负责人", //字段描述
            dbtype: "dbString", //数据类型
            length: 25,
        },
        FQUALITYSUPERVISOR: {
            name: "FQUALITYSUPERVISOR", //字段ID
            label: "质量负责人", //字段描述
            dbtype: "dbString", //数据类型
            length: 25,
        },
        FCONTACTMAN: {
            name: "FCONTACTMAN", //字段ID
            label: "联系人", //字段描述
            dbtype: "dbString", //数据类型
            length: 25,
        },
        FCONTACTTEL: {
            name: "FCONTACTTEL", //字段ID
            label: "联系电话", //字段描述
            dbtype: "dbString", //数据类型
            length: 25,
        },
        FFAX: {
            name: "FFAX", //字段ID
            label: "传真", //字段描述
            dbtype: "dbString", //数据类型
            length: 25,
        },
        FADDRESS: {
            name: "FADDRESS", //字段ID
            label: "地址", //字段描述
            dbtype: "dbString", //数据类型
            length: 25,
        },

        FZIPCODE: {
            name: "FZIPCODE", //字段ID
            label: "邮编", //字段描述
            dbtype: "dbString", //数据类型
            length: 25,
        },

        FEMAIL: {
            name: "FEMAIL", //字段ID
            label: "电子邮件地址", //字段描述
            dbtype: "dbString", //数据类型
            length: 25,
        },

        FBUSINESSTYPE: {
            name: "FBUSINESSTYPE", //字段ID
            label: "经营类型", //字段描述
            dbtype: "dbString", //数据类型
            length: 25,
        },
        FBUSINESSTYPEID: {
            name: "FBUSINESSTYPEID", //字段ID
            label: "经营类型ID", //字段描述
            dbtype: "dbString", //数据类型
            length: 25,
        },


        FCERTIFICATION: {
            name: "FCERTIFICATION", //字段ID
            label: "认证类别", //字段描述
            dbtype: "dbString", //数据类型
            length: 25,
        },
        FCERTIFICATIONID: {
            name: "FCERTIFICATIONID", //字段ID
            label: "认证类别ID", //字段描述
            dbtype: "dbString", //数据类型
            length: 25,
        },

        FCUSTOMERCATEGORY: {
            name: "FCUSTOMERCATEGORY", //字段ID
            label: "供应商类型", //字段描述
            dbtype: "dbString", //数据类型
            length: 25,
        },
        FCUSTOMERCATEGORYID: {
            name: "FCUSTOMERCATEGORYID", //字段ID
            label: "供应商类型ID", //字段描述
            dbtype: "dbString", //数据类型
            length: 25,
        },

        FSALESMAN: {
            name: "FSALESMAN", //字段ID
            label: "业务员", //字段描述
            dbtype: "dbString", //数据类型
            length: 25,
        },

        FSALESMANIDCARD: {
            name: "FSALESMANIDCARD", //字段ID
            label: "业务员身份证", //字段描述
            dbtype: "dbString", //数据类型
            length: 25,
        },

        FTAXID: {
            name: "FTAXID", //字段ID
            label: "税务登记号", //字段描述
            dbtype: "dbString", //数据类型
            length: 25,
        },

        FAREA: {
            name: "FAREA", //字段ID
            label: "所在地区", //字段描述
            dbtype: "dbString", //数据类型
            length: 100,
        },

        FBUSINESSSCOPE: {
            name: "FBUSINESSSCOPE", //字段ID
            label: "经营范围", //字段描述
            dbtype: "dbString", //数据类型
            length: 25,
        },

        FBANK: {
            name: "FBANK", //字段ID
            label: "开户行", //字段描述
            dbtype: "dbString", //数据类型
            length: 25,
        },

        FBANKACCOUNT: {
            name: "FBANKACCOUNT", //字段ID
            label: "银行账户", //字段描述
            dbtype: "dbString", //数据类型
            length: 25,
        },

        FBUSINESSLICENSEIMG: {
            name: "FBUSINESSLICENSEIMG", //字段ID
            label: "营业执照图片", //字段描述
            dbtype: "dbString", //数据类型
            length: 500,
        },
        FBUSINESSLICENSEID: {
            name: "FBUSINESSLICENSEID", //字段ID
            label: "营业执照号", //字段描述
            dbtype: "dbString", //数据类型
            length: 25,
        },

        FBUSINESSLICENSEDATE: {
            name: "FBUSINESSLICENSEDATE", //字段ID
            label: "营业执照有效期", //字段描述
            dbtype: "dbDate", //数据类型
            length: 25,
        },

        FBUSINESSLICENSESCOPE: {
            name: "FBUSINESSLICENSESCOPE", //字段ID
            label: "营业执照经营范围", //字段描述
            dbtype: "dbString", //数据类型
            length: 25,
        },
        FDRUGLICENSEIMG: {
            name: "FDRUGLICENSEIMG", //字段ID
            label: "药品许可证图片", //字段描述
            dbtype: "dbString", //数据类型
            length: 500,
        },
        FDRUGLICENSEID: {
            name: "FDRUGLICENSEID", //字段ID
            label: "药品许可证号", //字段描述
            dbtype: "dbString", //数据类型
            length: 25,
        },

        FDRUGLICENSEDATE: {
            name: "FDRUGLICENSEDATE", //字段ID
            label: "药品许可证有效期", //字段描述
            dbtype: "dbDate", //数据类型
            length: 25,
        },

        FDRUGLICENSESCOPE: {
            name: "FDRUGLICENSESCOPE", //字段ID
            label: "药品许可证经营范围", //字段描述
            dbtype: "dbString", //数据类型
            length: 25,
        },
        FGSPLICENSEIMG: {
            name: "FGSPLICENSEIMG", //字段ID
            label: "GMP/GSP许可证图片", //字段描述
            dbtype: "dbString", //数据类型
            length: 500,
        },
        FGSPLICENSEID: {
            name: "FGSPLICENSEID", //字段ID
            label: "GMP/GSP许可证号", //字段描述
            dbtype: "dbString", //数据类型
            length: 25,
        },

        FGSPLICENSEDATE: {
            name: "FGSPLICENSEDATE", //字段ID
            label: "GMP/GSP许可证有效期", //字段描述
            dbtype: "dbDate", //数据类型
            length: 25,
        },

        FGSPLICENSESCOPE: {
            name: "FGSPLICENSESCOPE", //字段ID
            label: "GMP/GSP许可证经营范围	", //字段描述
            dbtype: "dbString", //数据类型
            length: 25,
        },
        FMEDICALINSTRUMENTIMG: {
            name: "FMEDICALINSTRUMENTIMG", //字段ID
            label: "医疗器械许可证图片", //字段描述
            dbtype: "dbString", //数据类型
            length: 500,
        },
        FMEDICALINSTRUMENTID: {
            name: "FMEDICALINSTRUMENTID   ", //字段ID
            label: "医疗器械许可证号", //字段描述
            dbtype: "dbString", //数据类型
            length: 25,
        },

        FMEDICALINSTRUMENTDATE: {
            name: "FMEDICALINSTRUMENTDATE", //字段ID
            label: "医疗器械许可证有效期", //字段描述
            dbtype: "dbDate", //数据类型
            length: 25,
        },

        FMEDICALINSTRUMENTSCOPE: {
            name: "FMEDICALINSTRUMENTSCOPE", //字段ID
            label: "医疗器械许可证经营范围", //字段描述
            dbtype: "dbString", //数据类型
            length: 25,
        },
        FHEALTHLICENSEIMG: {
            name: "FHEALTHLICENSEIMG", //字段ID
            label: "卫生许可证图片", //字段描述
            dbtype: "dbString", //数据类型
            length: 500,
        },
        FHEALTHLICENSEID: {
            name: "FHEALTHLICENSEID   ", //字段ID
            label: "卫生许可证号", //字段描述
            dbtype: "dbString", //数据类型
            length: 25,
        },

        FHEALTHLICENSEDATE: {
            name: "FHEALTHLICENSEDATE", //字段ID
            label: "卫生许可证有效期", //字段描述
            dbtype: "dbDate", //数据类型
            length: 25,
        },

        FHEALTHLICENSESCOPE: {
            name: "FHEALTHLICENSESCOPE", //字段ID
            label: "卫生许可证经营范围", //字段描述
            dbtype: "dbString", //数据类型
            length: 25,
        },
        FFOODBUSINESSLICENSEIMG: {
            name: "FFOODBUSINESSLICENSEIMG", //字段ID
            label: "食品经营许可证图片", //字段描述
            dbtype: "dbString", //数据类型
            length: 250,
        },
        FFOODBUSINESSLICENSEID: {
            name: "FFOODBUSINESSLICENSEID", //字段ID
            label: "食品经营许可证号", //字段描述
            dbtype: "dbString", //数据类型
            length: 25,
        },

        FFOODBUSINESSLICENSEDATE: {
            name: "FFOODBUSINESSLICENSEDATE", //字段ID
            label: "食品经营许可证有效期", //字段描述
            dbtype: "dbDate", //数据类型
            length: 25,
        },

        FFOODBUSINESSLICENSESCOPE: {
            name: "FFOODBUSINESSLICENSESCOPE", //字段ID
            label: "食品经营许可证经营范围", //字段描述
            dbtype: "dbString", //数据类型
            length: 25,
        },

        FORGCODE: {
            name: "FORGCODE", //字段ID
            label: "组织机构代码号", //字段描述
            dbtype: "dbString", //数据类型
            length: 25,
        },

        FLEGALPERSONAUTHDATE: {
            name: "FLEGALPERSONAUTHDATE", //字段ID
            label: "法人授权有效期", //字段描述
            dbtype: "dbDate", //数据类型
            length: 25,
        },

        FQUALITYASSURANCEDATE: {
            name: "FQUALITYASSURANCEDATE", //字段ID
            label: "质量保证有效期   ", //字段描述
            dbtype: "dbDate", //数据类型
            length: 25,
        },

        FPURCHASECONTRACTDATE: {
            name: "FPURCHASECONTRACTDATE", //字段ID
            label: "购销合同有效期", //字段描述
            dbtype: "dbDate", //数据类型
            length: 25,
        },

        FUSERID: {
            name: "FUSERID", //字段ID
            label: "创建人", //字段描述
            dbtype: "dbString", //数据类型
            required: true,
            readonly: true,
            length: 25,
            default: {
                //默认值
                //rule: 'first', //prior   填充规则
                exps: (data) => {
                    //填充表达式
                    return currentUserID();
                },
            },
        },

        FCREATEDATE: {
            name: "FCREATEDATE", //字段ID
            label: "创建日期", //字段描述
            dbtype: "dbDate", //数据类型
            readonly: true,
            default: {
                //默认值
                exps: (data) => {
                    //填充表达式
                    return utils.date.format(new Date(), "yyyy-MM-dd HH:mm:ss");
                },
            },
        },

        FENTERPRISEDESC: {
            name: "FENTERPRISEDESC", //字段ID
            label: "企业名称", //字段描述
            dbtype: "dbString", //数据类型
            length: 25,
        },
        FENTERPRISEID: {
            name: "FENTERPRISEID", //字段ID
            label: "企业ID", //字段描述
            dbtype: "dbString", //数据类型
            length: 25,
        },
        FNOTE: {
            name: "FNOTE", //字段ID
            label: "备注", //字段描述
            dbtype: "dbString", //数据类型
            length: 250,
        },

    }
}